home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-02-12 | 28.5 KB | 1,125 lines | [TEXT/MPS ] |
- ;
- ; File: Power.a
- ;
- ; Contains: Power Manager Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Release: Universal Interfaces 3.1
- ;
- ; Copyright: © 1990-1998 by Apple Computer, Inc. All rights reserved
- ;
- ; Bugs?: Please include the the file and version information (from above) with
- ; the problem description. Developers belonging to one of the Apple
- ; developer programs can submit bug reports to:
- ;
- ; devsupport@apple.com
- ;
- ;
- IF &TYPE('__POWER__') = 'UNDEFINED' THEN
- __POWER__ SET 1
-
- IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
- include 'MacTypes.a'
- ENDIF
- IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
- include 'MixedMode.a'
- ENDIF
-
-
- ; Bit positions for ModemByte
- modemOnBit EQU 0
- ringWakeUpBit EQU 2
- modemInstalledBit EQU 3
- ringDetectBit EQU 4
- modemOnHookBit EQU 5
-
- ; masks for ModemByte
- modemOnMask EQU $01
- ringWakeUpMask EQU $04
- modemInstalledMask EQU $08
- ringDetectMask EQU $10
- modemOnHookMask EQU $20
-
- ; bit positions for BatteryByte
- chargerConnBit EQU 0
- hiChargeBit EQU 1
- chargeOverFlowBit EQU 2
- batteryDeadBit EQU 3
- batteryLowBit EQU 4
- connChangedBit EQU 5
-
- ; masks for BatteryByte
- chargerConnMask EQU $01
- hiChargeMask EQU $02
- chargeOverFlowMask EQU $04
- batteryDeadMask EQU $08
- batteryLowMask EQU $10
- connChangedMask EQU $20
-
- ; bit positions for SoundMixerByte
- MediaBaySndEnBit EQU 0
- PCISndEnBit EQU 1
- ZVSndEnBit EQU 2
- PCCardSndEnBit EQU 3
-
- ; masks for SoundMixerByte
- MediaBaySndEnMask EQU $01
- PCISndEnMask EQU $02
- ZVSndEnMask EQU $04
- PCCardSndEnMask EQU $08
-
- ; commands to SleepQRec sleepQProc
- sleepRequest EQU 1
- sleepDemand EQU 2
- sleepWakeUp EQU 3
- sleepRevoke EQU 4
- sleepUnlock EQU 4
- sleepDeny EQU 5
- sleepNow EQU 6
- dozeDemand EQU 7
- dozeWakeUp EQU 8
- dozeRequest EQU 9
-
- ; SleepQRec.sleepQFlags
- noCalls EQU 1
- noRequest EQU 2
- slpQType EQU 16
- sleepQType EQU 16
- ; bits in bitfield returned by PMFeatures
-
- hasWakeupTimer EQU 0 ; 1=wakeup timer is supported
- hasSharedModemPort EQU 1 ; 1=modem port shared by SCC and internal modem
- hasProcessorCycling EQU 2 ; 1=processor cycling is supported
- mustProcessorCycle EQU 3 ; 1=processor cycling should not be turned off
- hasReducedSpeed EQU 4 ; 1=processor can be started up at reduced speed
- dynamicSpeedChange EQU 5 ; 1=processor speed can be switched dynamically
- hasSCSIDiskMode EQU 6 ; 1=SCSI Disk Mode is supported
- canGetBatteryTime EQU 7 ; 1=battery time can be calculated
- canWakeupOnRing EQU 8 ; 1=can wakeup when the modem detects a ring
- hasDimmingSupport EQU 9 ; 1=has dimming support built in (DPMS standby by default)
- hasStartupTimer EQU 10 ; 1=startup timer is supported
- hasChargeNotification EQU 11 ; 1=client can determine of charge connect status change notifications available
- hasDimSuspendSupport EQU 12 ; 1=supports dimming LCD and CRT to DPMS suspend state
- ; bits in bitfield returned by GetIntModemInfo and set by SetIntModemState
-
- hasInternalModem EQU 0 ; 1=internal modem installed
- intModemRingDetect EQU 1 ; 1=internal modem has detected a ring
- intModemOffHook EQU 2 ; 1=internal modem is off hook
- intModemRingWakeEnb EQU 3 ; 1=wakeup on ring is enabled
- extModemSelected EQU 4 ; 1=external modem selected
- modemSetBit EQU 15 ; 1=set bit, 0=clear bit (SetIntModemState)
- ; bits in BatteryInfo.flags
- ; ("chargerConnected" doesn't mean the charger is plugged in)
-
- batteryInstalled EQU 7 ; 1=battery is currently connected
- batteryCharging EQU 6 ; 1=battery is being charged
- chargerConnected EQU 5 ; 1=charger is connected to the PowerBook
-
- HDPwrQType EQU $4844 ; 'HD' hard disk spindown queue element type
- PMgrStateQType EQU $504D ; 'PM' Power Manager state queue element type
- ; client notification bits in PMgrQueueElement.pmNotifyBits
-
- pmSleepTimeoutChanged EQU 0
- pmSleepEnableChanged EQU 1
- pmHardDiskTimeoutChanged EQU 2
- pmHardDiskSpindownChanged EQU 3
- pmDimmingTimeoutChanged EQU 4
- pmDimmingEnableChanged EQU 5
- pmDiskModeAddressChanged EQU 6
- pmProcessorCyclingChanged EQU 7
- pmProcessorSpeedChanged EQU 8
- pmWakeupTimerChanged EQU 9
- pmStartupTimerChanged EQU 10
- pmHardDiskPowerRemovedbyUser EQU 11
- pmChargeStatusChanged EQU 12
- pmPowerLevelChanged EQU 13
- ; System Activity Selectors
-
- OverallAct EQU 0 ; general type of activity
- UsrActivity EQU 1 ; user specific type of activity
- NetActivity EQU 2 ; network specific activity
- HDActivity EQU 3 ; Hard Drive activity
- ; Storage Media sleep mode defines
-
- kMediaModeOn EQU 0 ; Media active (Drive spinning and at full power)
- kMediaModeStandBy EQU 1 ; Media standby (not implemented)
- kMediaModeSuspend EQU 2 ; Media Idle (not implemented)
- kMediaModeOff EQU 3 ; Media Sleep (Drive not spinning and at min power, max recovery time)
-
- kMediaPowerCSCode EQU 70
-
- ; definitions for HDQueueElement.hdFlags
-
- kHDQueuePostBit EQU 0 ; 1 = call this routine on the second pass
- kHDQueuePostMask EQU $01
- ActivityInfo RECORD 0
- ActivityType ds.w 1 ; offset: $0 (0) ; Type of activity to be fetched. Same as UpdateSystemActivity Selectors
- ActivityTime ds.l 1 ; offset: $2 (2) ; Time of last activity (in ticks) of specified type.
- sizeof EQU * ; size: $6 (6)
- ENDR
- ; information returned by GetScaledBatteryInfo
- BatteryInfo RECORD 0
- flags ds.b 1 ; offset: $0 (0) ; misc flags (see below)
- warningLevel ds.b 1 ; offset: $1 (1) ; scaled warning level (0-255)
- reserved ds.b 1 ; offset: $2 (2) ; reserved for internal use
- batteryLevel ds.b 1 ; offset: $3 (3) ; scaled battery level (0-255)
- sizeof EQU * ; size: $4 (4)
- ENDR
- ; typedef SInt8 ModemByte
-
- ; typedef SInt8 BatteryByte
-
- ; typedef SInt8 SoundMixerByte
-
- ; typedef long PMResultCode
-
-
-
- ; typedef SleepQRec * SleepQRecPtr
-
-
-
-
-
- SleepQRec RECORD 0
- sleepQLink ds.l 1 ; offset: $0 (0) ; pointer to next queue element
- sleepQType ds.w 1 ; offset: $4 (4) ; queue element type (must be SleepQType)
- sleepQProc ds.l 1 ; offset: $6 (6) ; pointer to sleep universal proc ptr
- sleepQFlags ds.w 1 ; offset: $A (10) ; flags
- sizeof EQU * ; size: $C (12)
- ENDR
- HDQueueElement RECORD 0
- hdQLink ds.l 1 ; offset: $0 (0) ; pointer to next queue element
- hdQType ds.w 1 ; offset: $4 (4) ; queue element type (must be HDPwrQType)
- hdFlags ds.w 1 ; offset: $6 (6) ; miscellaneous flags
- hdProc ds.l 1 ; offset: $8 (8) ; pointer to routine to call
- hdUser ds.l 1 ; offset: $C (12) ; user-defined (variable storage, etc.)
- sizeof EQU * ; size: $10 (16)
- ENDR
- PMgrQueueElement RECORD 0
- pmQLink ds.l 1 ; offset: $0 (0) ; pointer to next queue element
- pmQType ds.w 1 ; offset: $4 (4) ; queue element type (must be PMgrStateQType)
- pmFlags ds.w 1 ; offset: $6 (6) ; miscellaneous flags
- pmNotifyBits ds.l 1 ; offset: $8 (8) ; bitmap of which changes to be notified for
- pmProc ds.l 1 ; offset: $C (12) ; pointer to routine to call
- pmUser ds.l 1 ; offset: $10 (16) ; user-defined (variable storage, etc.)
- sizeof EQU * ; size: $14 (20)
- ENDR
-
- BatteryTimeRec RECORD 0
- expectedBatteryTime ds.l 1 ; offset: $0 (0) ; estimated battery time remaining (seconds)
- minimumBatteryTime ds.l 1 ; offset: $4 (4) ; minimum battery time remaining (seconds)
- maximumBatteryTime ds.l 1 ; offset: $8 (8) ; maximum battery time remaining (seconds)
- timeUntilCharged ds.l 1 ; offset: $C (12) ; time until battery is fully charged (seconds)
- sizeof EQU * ; size: $10 (16)
- ENDR
-
- WakeupTime RECORD 0
- wakeTime ds.l 1 ; offset: $0 (0) ; wakeup time (same format as current time)
- wakeEnabled ds.b 1 ; offset: $4 (4) ; 1=enable wakeup timer, 0=disable wakeup timer
- filler ds.b 1 ; offset: $5 (5)
- sizeof EQU * ; size: $6 (6)
- ENDR
-
- StartupTime RECORD 0
- startTime ds.l 1 ; offset: $0 (0) ; startup time (same format as current time)
- startEnabled ds.b 1 ; offset: $4 (4) ; 1=enable startup timer, 0=disable startup timer
- filler ds.b 1 ; offset: $5 (5)
- sizeof EQU * ; size: $6 (6)
- ENDR
- ;
- ; pascal OSErr DisableWUTime(void )
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DisableWUTime
- ENDIF
-
- ;
- ; pascal OSErr SetWUTime(long WUTime)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetWUTime
- ENDIF
-
- ;
- ; pascal OSErr GetWUTime(long *WUTime, Byte *WUFlag)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetWUTime
- ENDIF
-
- ;
- ; pascal OSErr BatteryStatus(Byte *Status, Byte *Power)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION BatteryStatus
- ENDIF
-
- ;
- ; pascal OSErr ModemStatus(Byte *Status)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ModemStatus
- ENDIF
-
- ;
- ; pascal long IdleUpdate(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; long <= D0
- _IdleUpdate: OPWORD $A285
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IdleUpdate
- ENDIF
-
- ;
- ; pascal long GetCPUSpeed(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; long <= D0
- Macro
- _GetCPUSpeed
- moveq #-1,D0
- dc.w $A485
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetCPUSpeed
- ENDIF
-
- ;
- ; pascal void EnableIdle(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _EnableIdle
- moveq #0,D0
- dc.w $A485
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION EnableIdle
- ENDIF
-
- ;
- ; pascal void DisableIdle(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DisableIdle
- moveq #1,D0
- dc.w $A485
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DisableIdle
- ENDIF
-
- ;
- ; pascal void SleepQInstall(SleepQRecPtr qRecPtr)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; qRecPtr => A0
- _SleepQInstall: OPWORD $A28A
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SleepQInstall
- ENDIF
-
- ;
- ; pascal void SleepQRemove(SleepQRecPtr qRecPtr)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; qRecPtr => A0
- _SleepQRemove: OPWORD $A48A
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SleepQRemove
- ENDIF
-
- ;
- ; pascal void AOn(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _AOn
- moveq #4,D0
- dc.w $A685
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION AOn
- ENDIF
-
- ;
- ; pascal void AOnIgnoreModem(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _AOnIgnoreModem
- moveq #5,D0
- dc.w $A685
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION AOnIgnoreModem
- ENDIF
-
- ;
- ; pascal void BOn(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _BOn
- moveq #0,D0
- dc.w $A685
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION BOn
- ENDIF
-
- ;
- ; pascal void AOff(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _AOff
- moveq #-124,D0
- dc.w $A685
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION AOff
- ENDIF
-
- ;
- ; pascal void BOff(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _BOff
- moveq #-128,D0
- dc.w $A685
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION BOff
- ENDIF
-
-
- ; Public Power Management API (NEW!)
-
- ;
- ; pascal short PMSelectorCount(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; short <= D0
- Macro
- _PMSelectorCount
- moveq #0,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION PMSelectorCount
- ENDIF
-
- ;
- ; pascal unsigned long PMFeatures(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; unsigned long <= D0
- Macro
- _PMFeatures
- moveq #1,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION PMFeatures
- ENDIF
-
- ;
- ; pascal UInt8 GetSleepTimeout(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; UInt8 <= D0
- Macro
- _GetSleepTimeout
- moveq #2,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetSleepTimeout
- ENDIF
-
- ;
- ; pascal void SetSleepTimeout(UInt8 timeout)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; timeout => D0
- Macro
- _SetSleepTimeout
- swap D0
- move.w #$0003,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetSleepTimeout
- ENDIF
-
- ;
- ; pascal UInt8 GetHardDiskTimeout(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; UInt8 <= D0
- Macro
- _GetHardDiskTimeout
- moveq #4,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetHardDiskTimeout
- ENDIF
-
- ;
- ; pascal void SetHardDiskTimeout(UInt8 timeout)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; timeout => D0
- Macro
- _SetHardDiskTimeout
- swap D0
- move.w #$0005,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetHardDiskTimeout
- ENDIF
-
- ;
- ; pascal Boolean HardDiskPowered(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _HardDiskPowered
- moveq #6,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HardDiskPowered
- ENDIF
-
- ;
- ; pascal void SpinDownHardDisk(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SpinDownHardDisk
- moveq #7,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SpinDownHardDisk
- ENDIF
-
- ;
- ; pascal Boolean IsSpindownDisabled(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsSpindownDisabled
- moveq #8,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IsSpindownDisabled
- ENDIF
-
- ;
- ; pascal void SetSpindownDisable(Boolean setDisable)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; setDisable => D0
- Macro
- _SetSpindownDisable
- swap D0
- move.w #$0009,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetSpindownDisable
- ENDIF
-
- ;
- ; pascal OSErr HardDiskQInstall(HDQueueElement *theElement)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _HardDiskQInstall
- moveq #10,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HardDiskQInstall
- ENDIF
-
- ;
- ; pascal OSErr HardDiskQRemove(HDQueueElement *theElement)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _HardDiskQRemove
- moveq #11,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HardDiskQRemove
- ENDIF
-
- ;
- ; pascal void GetScaledBatteryInfo(short whichBattery, BatteryInfo *theInfo)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; whichBatterytheInfo=> D0
- ; theInfo => A0
- Macro
- _GetScaledBatteryInfo
- swap D0
- move.w #$000C,D0
- dc.w $A09E
- move.l D0,(A0)
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetScaledBatteryInfo
- ENDIF
-
- ;
- ; pascal void AutoSleepControl(Boolean enableSleep)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; enableSleep => D0
- Macro
- _AutoSleepControl
- swap D0
- move.w #$000D,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION AutoSleepControl
- ENDIF
-
- ;
- ; pascal unsigned long GetIntModemInfo(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; unsigned long <= D0
- Macro
- _GetIntModemInfo
- moveq #14,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetIntModemInfo
- ENDIF
-
- ;
- ; pascal void SetIntModemState(short theState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theState => D0
- Macro
- _SetIntModemState
- swap D0
- move.w #$000F,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetIntModemState
- ENDIF
-
- ;
- ; pascal short MaximumProcessorSpeed(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; short <= D0
- Macro
- _MaximumProcessorSpeed
- moveq #16,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION MaximumProcessorSpeed
- ENDIF
-
- ;
- ; pascal short CurrentProcessorSpeed(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; short <= D0
- Macro
- _CurrentProcessorSpeed
- moveq #17,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CurrentProcessorSpeed
- ENDIF
-
- ;
- ; pascal Boolean FullProcessorSpeed(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _FullProcessorSpeed
- moveq #18,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION FullProcessorSpeed
- ENDIF
-
- ;
- ; pascal Boolean SetProcessorSpeed(Boolean fullSpeed)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; fullSpeed => D0
- ; returns:
- ; Boolean <= D0
- Macro
- _SetProcessorSpeed
- swap D0
- move.w #$0013,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetProcessorSpeed
- ENDIF
-
- ;
- ; pascal short GetSCSIDiskModeAddress(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; short <= D0
- Macro
- _GetSCSIDiskModeAddress
- moveq #20,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetSCSIDiskModeAddress
- ENDIF
-
- ;
- ; pascal void SetSCSIDiskModeAddress(short scsiAddress)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; scsiAddress => D0
- Macro
- _SetSCSIDiskModeAddress
- swap D0
- move.w #$0015,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetSCSIDiskModeAddress
- ENDIF
-
- ;
- ; pascal void GetWakeupTimer(WakeupTime *theTime)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theTime => A0
- Macro
- _GetWakeupTimer
- moveq #22,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetWakeupTimer
- ENDIF
-
- ;
- ; pascal void SetWakeupTimer(WakeupTime *theTime)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theTime => A0
- Macro
- _SetWakeupTimer
- moveq #23,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetWakeupTimer
- ENDIF
-
- ;
- ; pascal Boolean IsProcessorCyclingEnabled(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsProcessorCyclingEnabled
- moveq #24,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IsProcessorCyclingEnabled
- ENDIF
-
- ;
- ; pascal void EnableProcessorCycling(Boolean enable)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; enable => D0
- Macro
- _EnableProcessorCycling
- swap D0
- move.w #$0019,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION EnableProcessorCycling
- ENDIF
-
- ;
- ; pascal short BatteryCount(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; short <= D0
- Macro
- _BatteryCount
- moveq #26,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION BatteryCount
- ENDIF
-
- ;
- ; pascal Fixed GetBatteryVoltage(short whichBattery)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; whichBattery => D0
- ; returns:
- ; Fixed <= D0
- Macro
- _GetBatteryVoltage
- swap D0
- move.w #$001B,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetBatteryVoltage
- ENDIF
-
- ;
- ; pascal void GetBatteryTimes(short whichBattery, BatteryTimeRec *theTimes)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; whichBatterytheTimes=> D0
- ; theTimes => A0
- Macro
- _GetBatteryTimes
- swap D0
- move.w #$001C,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetBatteryTimes
- ENDIF
-
- ;
- ; pascal UInt8 GetDimmingTimeout(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; UInt8 <= D0
- Macro
- _GetDimmingTimeout
- moveq #29,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDimmingTimeout
- ENDIF
-
- ;
- ; pascal void SetDimmingTimeout(UInt8 timeout)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; timeout => D0
- Macro
- _SetDimmingTimeout
- swap D0
- move.w #$001E,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDimmingTimeout
- ENDIF
-
- ;
- ; pascal void DimmingControl(Boolean enableSleep)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; enableSleep => D0
- Macro
- _DimmingControl
- swap D0
- move.w #$001F,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DimmingControl
- ENDIF
-
- ;
- ; pascal Boolean IsDimmingControlDisabled(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsDimmingControlDisabled
- moveq #32,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IsDimmingControlDisabled
- ENDIF
-
- ;
- ; pascal Boolean IsAutoSlpControlDisabled(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsAutoSlpControlDisabled
- moveq #33,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION IsAutoSlpControlDisabled
- ENDIF
-
- ;
- ; pascal OSErr PMgrStateQInstall(PMgrQueueElement *theElement)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _PMgrStateQInstall
- moveq #34,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION PMgrStateQInstall
- ENDIF
-
- ;
- ; pascal OSErr PMgrStateQRemove(PMgrQueueElement *theElement)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _PMgrStateQRemove
- moveq #35,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION PMgrStateQRemove
- ENDIF
-
- ;
- ; pascal OSErr UpdateSystemActivity(UInt8 activity)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; activity => D0
- ; returns:
- ; OSErr <= D0
- Macro
- _UpdateSystemActivity
- swap D0
- move.w #$0024,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION UpdateSystemActivity
- ENDIF
-
- ;
- ; pascal OSErr DelaySystemIdle(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; OSErr <= D0
- Macro
- _DelaySystemIdle
- moveq #37,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DelaySystemIdle
- ENDIF
-
- ;
- ; pascal OSErr GetStartupTimer(StartupTime *theTime)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theTime => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _GetStartupTimer
- moveq #38,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetStartupTimer
- ENDIF
-
- ;
- ; pascal OSErr SetStartupTimer(StartupTime *theTime)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theTime => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _SetStartupTimer
- moveq #39,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetStartupTimer
- ENDIF
-
- ;
- ; pascal OSErr GetLastActivity(ActivityInfo *theActivity)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theActivity => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _GetLastActivity
- moveq #40,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetLastActivity
- ENDIF
-
- ;
- ; pascal OSErr GetSoundMixerState(SoundMixerByte *theSoundMixerByte)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theSoundMixerByte=> A0
- ; returns:
- ; OSErr <= D0
- Macro
- _GetSoundMixerState
- moveq #41,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetSoundMixerState
- ENDIF
-
- ;
- ; pascal OSErr SetSoundMixerState(SoundMixerByte *theSoundMixerByte)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; theSoundMixerByte=> A0
- ; returns:
- ; OSErr <= D0
- Macro
- _SetSoundMixerState
- moveq #42,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetSoundMixerState
- ENDIF
-
- ;
- ; pascal Boolean GetDimSuspendState(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _GetDimSuspendState
- moveq #43,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDimSuspendState
- ENDIF
-
- ;
- ; pascal void SetDimSuspendState(Boolean dimSuspendState)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- ; parameters:
- ; dimSuspendState => D0
- Macro
- _SetDimSuspendState
- swap D0
- move.w #$002C,D0
- dc.w $A09E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDimSuspendState
- ENDIF
-
-
- ENDIF ; __POWER__
-
-